package com.ruoyi;

import com.ruoyi.common.utils.ip.IpUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

/**
 * 启动程序
 *
 * @author ruoyi
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class RuoYiApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(RuoYiApplication.class, args);
        System.out.println("(♥◠‿◠)ﾉﾞ  启动成功   ლ(´ڡ`ლ)ﾞ  \n");
        Environment environment = context.getBean(Environment.class);

        System.out.println("启动成功，访问地址：http://" + IpUtils.getHostIp() + ":"
                + environment.getProperty("server.port") +
                environment.getProperty("server.servlet.context-path") + "，测试账号密码：admin/admin123");


    }
}
